Skip to content

Migrate to Pytest - #527

Merged
mfeurer merged 5 commits into
openml:developfrom
rth:pytest
Sep 19, 2018
Merged

Migrate to Pytest#527
mfeurer merged 5 commits into
openml:developfrom
rth:pytest

Conversation

@rth

@rth rth commented Sep 17, 2018

Copy link
Copy Markdown
Contributor

Closes #327

nose is not longer maintained and most popular packages in the scientific python community have migrated to pytest. The existing tests will run without modifications with pytest, but it will make easier,

@rth rth changed the title [WIP] Migrate to Pytest Migrate to Pytest Sep 19, 2018
@rth

rth commented Sep 19, 2018

Copy link
Copy Markdown
Contributor Author

CI is green.

What do you think about this @mfeurer @janvanrijn ?

@mfeurer mfeurer left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Could you please explain why use you replaced python setup.py develop by pip install -e '.[test]`` and what the argument '.[test]'` does?

@rth

rth commented Sep 19, 2018

Copy link
Copy Markdown
Contributor Author

So, pip install is now the recommended way to install packages (even local packages) as compared to python setup.py install (see https://packaging.python.org/tutorials/installing-packages/#installing-from-a-local-src-tree).

pip install .  # dot important at the end

installs the local package.

To get the behavior of develop, it's necessary to add the -e flag.

And to install extra dependencies, one would do,

pip install openml[test]

which installs extra "test" dependencies specified in the setup.py. So the sum of that in this case is,

pip install -e .[test]

with some parenthesis as I wasn't sure how bash would handle it.

@mfeurer

mfeurer commented Sep 19, 2018

Copy link
Copy Markdown
Collaborator

Thanks a lot for explaining this. I just talked to @janvanrijn and he's okay with merging this. Thanks a lot!

@mfeurer
mfeurer merged commit bd85d5e into openml:develop Sep 19, 2018
@rth
rth deleted the pytest branch September 19, 2018 14:09
@rth

rth commented Sep 19, 2018

Copy link
Copy Markdown
Contributor Author

Thanks for the review @mfeurer !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants